/**
 * @file ptrOpt.c
 * @author your name (you@domain.com)
 * @brief 对于变量指针的定义
 * @version 0.1
 * @date 2022-11-15
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#include <stdio.h>
int main()
{
    int i = 20;
    /*定义一个指向变量i的指针*/
    int *i_pointer = &i; 
    //i_pointer = &i;
    //*i_pointer = i;
    //line17~18都可以表示指向变量i的指针
    /*利用指针操作数据 20→25*/
    *i_pointer = *i_pointer + 5;
    printf("%p\n",i_pointer);
    printf("i=%d",*i_pointer);

    int a;
    char ch1 = 'a';
    char *char_p = &ch1;
    a=*char_p;
    printf("\n%d",a);

    int array[10]={1,2,3};
    int *array_P = array;
    array_P++;
    printf("\n%d",*(array_P));
}